Skip to content

gh-159127: Fix tests depending on the layout of unmapped text widgets - #159128

Merged
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:tests-unmapped-text-widget
Oct 10, 2026
Merged

serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:tests-unmapped-text-widget

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

test_count now maps the text widget and expects zero vertical pixels between indices on the same display line.

The codecontext tests now use a text longer than the visible height of the widget, so that it can be scrolled.

test_scroll now maps the windows, because synchronized scrolling depends on the geometry of mapped widgets. It failed with all Tk versions when run alone.

Tested with Tk 8.6.17, 8.6.18, 9.0.3, the 9.0 branch tip (9.0.5) and the trunk (9.1.1), and with 9.1b1.

…idgets

A text widget which has not been mapped yet had size 1x1 and its content
was laid out in that area, putting every character on its own display
line.  Tk no longer does this.
@serhiy-storchaka
serhiy-storchaka merged commit 5564790 into python:main Oct 10, 2026
71 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14, 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Oct 10, 2026

Copy link
Copy Markdown

GH-159133 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Oct 10, 2026
@bedevere-app

bedevere-app Bot commented Oct 10, 2026

Copy link
Copy Markdown

GH-159134 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Oct 10, 2026
serhiy-storchaka added a commit that referenced this pull request Oct 10, 2026
…widgets (GH-159128) (GH-159133)

A text widget which has not been mapped yet had size 1x1 and its content
was laid out in that area, putting every character on its own display
line.  Tk no longer does this.
(cherry picked from commit 5564790)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
serhiy-storchaka added a commit that referenced this pull request Oct 10, 2026
…widgets (GH-159128) (GH-159134)

A text widget which has not been mapped yet had size 1x1 and its content
was laid out in that area, putting every character on its own display
line.  Tk no longer does this.
(cherry picked from commit 5564790)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
orsenthil pushed a commit to orsenthil/cpython that referenced this pull request Oct 11, 2026
…idgets (pythonGH-159128)

A text widget which has not been mapped yet had size 1x1 and its content
was laid out in that area, putting every character on its own display
line.  Tk no longer does this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants